env.setErrorMessageBoxEnabled(true) -- for debug
-- ********** CVN75 START **********
local AirBoss_CVN75 = AIRBOSS:New("CVN-75", "格里芬级核动力航空母舰CVN75")

--local window1 = AirBoss_CVN75:AddRecoveryWindow(
--"5:25","17:00",
--1,
--nil,
--true,25)

AirBoss_CVN75:SetSoundfilesFolder("Airboss Soundfiles/")
AirBoss_CVN75:SetVoiceOversLSOByFF("Airboss Soundfiles/LSO")
AirBoss_CVN75:SetVoiceOversMarshalByFF("Airboss Soundfiles/MARSHAL")

-- 航母参数
AirBoss_CVN75:SetLSORadio(133.0)
AirBoss_CVN75:SetMarshalRadio(127.6)
AirBoss_CVN75:SetTACAN(75,"X", "C75")
AirBoss_CVN75:SetICLS(2, "C75")

AirBoss_CVN75:SetMenuSingleCarrier(false)

AirBoss_CVN75:SetMenuRecovery(30, 20, false)

AirBoss_CVN75:Load()

AirBoss_CVN75:SetAutoSave("D:\\Saved Games\\DCS.openbeta\\Missions\\AirBossData")

AirBoss_CVN75:SetTrapSheet()

Tanker_CVN75 = RECOVERYTANKER:New(UNIT:FindByName("CVN-75"), "GRIFFIN TANKER #001")
Tanker_CVN75:SetRadio(261)
Tanker_CVN75:SetTACAN(1,"S3B")
Tanker_CVN75:SetCallsign(CALLSIGN.Tanker.Shell, 3)
Tanker_CVN75:SetAltitude(18000)
Tanker_CVN75:SetSpeed(300)
Tanker_CVN75:SetUseUncontrolledAircraft()
Tanker_CVN75:SetTakeoffAir()
Tanker_CVN75:SetRespawnInAir()
Tanker_CVN75:SetModex(511)
Tanker_CVN75:__Start(10)

function Tanker_CVN75:OnAfterStart(From,Event,To)
  AirBoss_CVN75:SetRecoveryTanker(Tanker_CVN75)
  
end



function AirBoss_CVN75:OnAfterLSOGrade(From,Event,To,playerData,grade)
  local PlayerData = playerData
  local Grade = grade
  
  local score = tonumber(Grade.points)
  local name = tostring(PlayerData.name)
  
  local msg = "格里芬飞行员" .. name .. "着舰，分数: " .. tostring(score)
  MESSAGE:New(msg ,10, "航空长通报", false):ToAll()
  
end

AirBoss_CVN75:Start()




-- ********** CVN74 START **********
local AirBoss_CVN74 = AIRBOSS:New("CVN-74", "格里芬级核动力航空母舰CVN74")

--local window1 = AirBoss_CVN74:AddRecoveryWindow(
--"5:25","17:00",
--1,
--nil,
--true,25)

AirBoss_CVN74:SetSoundfilesFolder("Airboss Soundfiles/")

AirBoss_CVN74:SetVoiceOversLSOByFF("Airboss Soundfiles/LSO")
AirBoss_CVN74:SetVoiceOversMarshalByFF("Airboss Soundfiles/MARSHAL")

-- 航母参数
AirBoss_CVN74:SetLSORadio(134.0)
AirBoss_CVN74:SetMarshalRadio(127.5)
AirBoss_CVN74:SetTACAN(74,"X", "C74")
AirBoss_CVN74:SetICLS(1, "C74")

AirBoss_CVN74:SetMenuSingleCarrier(false)

AirBoss_CVN74:SetMenuRecovery(30, 25, false)

AirBoss_CVN74:Load()

AirBoss_CVN74:SetAutoSave("D:\\Saved Games\\DCS.openbeta\\Missions\\AirBossData")

AirBoss_CVN74:SetTrapSheet()

Tanker_CVN74 = RECOVERYTANKER:New(UNIT:FindByName("CVN-74"), "GRIFFIN TANKER #002")
Tanker_CVN74:SetRadio(262)
Tanker_CVN74:SetTACAN(2,"KC1")
Tanker_CVN74:SetCallsign(CALLSIGN.Tanker.Arco, 1)
Tanker_CVN74:SetAltitude(18000)
Tanker_CVN74:SetSpeed(300)
Tanker_CVN74:SetTakeoffAir()
Tanker_CVN74:SetRespawnInAir()
Tanker_CVN74:SetUseUncontrolledAircraft()
Tanker_CVN74:SetModex(512)
Tanker_CVN74:__Start(10)

function Tanker_CVN74:OnAfterStart(From,Event,To)
  AirBoss_CVN74:SetRecoveryTanker(Tanker_CVN74)
end

function AirBoss_CVN74:OnAfterLSOGrade(From,Event,To,playerData,grade)
  local PlayerData = playerData
  local Grade = grade
  
  local score = tonumber(Grade.points)
  local name = tostring(PlayerData.name)

end

AirBoss_CVN74:Start()

_SETTINGS:SetPlayerMenuOff()
env.setErrorMessageBoxEnabled(false)